﻿@model MinistryStandardPlatformEntity.InfoOilBox
@{
    Layout = "~/Views/Shared/_CommonLayout.cshtml";
}

<style>
    #typeContainer input[type='radio']
    {
        margin-left: 15px;
        vertical-align: middle;
    }

    #typeContainer label
    {
        vertical-align: middle;
    }

    #settingsContainer label
    {
        margin-left: 10px;
        margin-top: 10px;
    }

    #settingsContainer
    {
        margin-top: 10px;
        margin-bottom: 8px;
        border: #95B8E7 1px solid;
        height: 130px;
    }

    #settingsContainer label:not(.wrapable)
    {
        white-space: nowrap;
    }

    #settingsContainer input[type='text']
    {
        width: 130px;
    }

    table:not(.table2) tr
    {
        height: 58px;
    }

    .table2
    {
        width: 100%;
    }

    .table2 tr
    {
        height: 35px;
    }

    .table2 tr td
    {
        text-align:left;
    }
</style>
<script src="~/Scripts/project/operationmanagevehicleoilbox.js"></script>
<div id="popContainerDiv" style="height: 100%; vertical-align: middle; text-align: center;">
    <div id="typeContainer">
        <input type="radio" name="oilBoxType" id="type1" value="1"  checked="@(Model.oilLeverType == "1" || string.IsNullOrEmpty(Model.oilLeverType))"/>
        <label for="type1">标准立方体型</label>
        <input type="radio" name="oilBoxType" id="type2" value="2"  checked="@(Model.oilLeverType == "2")"/>
        <label for="type2">长方体型</label>
        <input type="radio" name="oilBoxType" id="type3" value="3"  checked="@(Model.oilLeverType == "3")"/>
        <label for="type3">平放圆柱体型</label>
        <input type="radio" name="oilBoxType" id="type4" value="4" checked="@(Model.oilLeverType == "4")" />
        <label for="type4">D型</label>
        <input type="radio" name="oilBoxType" id="type5" value="5" checked="@(Model.oilLeverType == "5")" />
        <label for="type5">自定义型</label>
    </div>
    <div class="fillparentheight" id="settingsContainer" style="height: 130px;">
        <form action="/Vehicle/OilBoxManage" method="post">
            <div style="display: block; height: 130px; line-height: 130px;">
                <input type="hidden" name="vehicleNum" value="@ViewBag.VehicleNum" />
                <input type="hidden" name="oilLeverType" value="1" />
                <label for="type1volumn">油箱容积(L):</label>
                <input type="text" id="type1volumn" name="oilCapacity" value="@Model.oilCapacity"/>
                <label for="type1height">油箱边长(cm):</label>
                <input type="text" id="type1height" name="oilHeight" value="@Model.oilHeight" readonly="readonly" placeholder="自动生成"/>
            </div>
        </form>
        <form action="/Vehicle/OilBoxManage" method="post">
            <div style="display: none;">
                <input type="hidden" name="vehicleNum" value="@ViewBag.VehicleNum" />
                <input type="hidden" name="oilLeverType" value="2" />
                <table style="height: 100%;">
                    <tr>
                        <td>
                            <label for="type2volumn">油箱容积(L):</label></td>
                        <td>
                            <input type="text" id="type2volumn" name="oilCapacity" value="@Model.oilCapacity" /></td>
                        <td>
                            <label for="type2length">油箱长度(cm):</label></td>
                        <td>
                            <input type="text" id="type2length" name="oilLength" value="@Model.oilLength" /></td>
                    </tr>
                    <tr>
                        <td>
                            <label for="type2width">油箱宽度(cm):</label></td>
                        <td>
                            <input type="text" id="type2width" name="oilWidth" value="@Model.oilWidth" /></td>
                        <td>
                            <label for="type2height">油箱高度(cm):</label></td>
                        <td>
                            <input type="text" id="type2height" name="oilHeight" value="@Model.oilHeight"  readonly="readonly" placeholder="自动生成"/></td>
                    </tr>
                </table>
            </div>
        </form>
        <form action="/Vehicle/OilBoxManage" method="post">
            <input type="hidden" name="vehicleNum" value="@ViewBag.VehicleNum" />
            <input type="hidden" name="oilLeverType" value="3" />
            <div style="display: none; height: 130px; line-height: 130px;">
                <label for="type3volumn">油箱容积(L):</label>
                <input type="text" id="type3volumn" name="oilCapacity" value="@Model.oilCapacity"/>
                <label for="type3height">油箱高度(cm):</label>
                <input type="text" id="type3height" name="oilHeight" value="@Model.oilHeight" />
            </div>
        </form>
        <form action="/Vehicle/OilBoxManage" method="post">
            <div style="display: none;">
                <input type="hidden" name="vehicleNum" value="@ViewBag.VehicleNum" />
                <input type="hidden" name="oilLeverType" value="4" />
                <table style="height: 100%;">
                    <tr>
                        <td>
                            <label for="type4volumn">油箱容积(L):</label></td>
                        <td>
                            <input type="text" id="type4volumn" name="oilCapacity" value="@Model.oilCapacity"/></td>
                        <td>
                            <label for="sectiondiameter">截面直径D/高度(cm):</label></td>
                        <td>
                            <input type="text" id="sectiondiameter" name="oilHeight" value="@Model.oilHeight" /></td>
                    </tr>
                    <tr>
                        <td>
                            <label for="type4length">油箱底长B(cm):</label></td>
                        <td>
                            <input type="text" id="type4length" name="oilLength" value="@Model.oilLength" /></td>
                        <td>
                            <label for="type4width">油箱底宽A(cm):</label></td>
                        <td>
                            <input type="text" id="type4width" name="oilWidth" value="@Model.oilWidth"  readonly="readonly" placeholder="自动生成"/></td>
                    </tr>
                </table>
            </div>
        </form>
        <form action="/Vehicle/OilBoxManage" method="post">
            <div style="display: none">
                <input type="hidden" name="vehicleNum" value="@ViewBag.VehicleNum" />
                <input type="hidden" name="oilLeverType" value="5" />
                <input type="hidden" name="sampleData" id="sampleData" value="@Model.sampleData" />
                <input type="hidden" id="sampledatacount" value="0"/>
                <table class="table2" style="border-collapse: collapse;">
                    <tr>
                        <td colspan="2"><label>请添加采样值（最少3组，最多10组）：</label></td>
                        <td style="border-left:#95B8E7 1px solid;border-bottom:#95B8E7 1px solid;">
                            <label for="type5volumn">油箱容积(L):</label></td>
                        <td style="border-bottom:#95B8E7 1px solid;">
                            <input type="text" id="type5volumn" name="oilCapacity" value="@Model.oilCapacity"/></td>
                        <td  style="border-bottom:#95B8E7 1px solid;"></td>
                    </tr>
                    <tr>
                        <td>
                            <label>油量(L)：</label></td>
                        <td>
                            <input type="text" name="samplex" id="samplex" /></td>
                        <td>
                            <label>参数：</label></td>
                        <td>
                            <input type="text" name="sampley" id="sampley" /></td>
                        <td>
                            <input type="button" id="addSampleData" value="添加" /></td>
                    </tr>
                    <tr>
                        <td colspan="5">
                            <label id="sampleDataShow" class="wrapable"></label>
                            <input type="button" value="清空" style="display: none;" id="clearSampleData" /></td>
                    </tr>
                </table>
            </div>
        </form>
    </div>
    <div style="text-align: center; height: 60px;">
        <input type="button" id="confirmBtn" value="确定" />
        <input type="button" id="cancelBtn" value="取消" onclick="javascript: window.top.art.dialog.get('operationmanagevehicleoilboxmanage').close();" />
        <div style="height: 30px;">
                <label class="alert" id="result">@ViewBag.Message</label>
        </div>
    </div>
</div>
